#ifndef ECON_CORE_H
#define ECON_CORE_H

#include <stddef.h>

#ifdef __cplusplus
extern "C" {
#endif

// Basic economic data structures
typedef struct {
    double* values;
    size_t size;
} TimeSeries;

typedef struct {
    double* x;
    double* y; 
    size_t count;
} DataPoints;

// Economic calculations
double calculateGDP(double consumption, double investment,
                   double governmentSpending, double netExports);

double calculateInflationRate(double currentCPI, double previousCPI);

// Regression analysis
void linearRegression(const DataPoints* data, double* slope, double* intercept);

// Time series analysis
double calculateMovingAverage(const TimeSeries* series, int window);

// Memory management
void freeTimeSeries(TimeSeries* series);
void freeDataPoints(DataPoints* points);

#ifdef __cplusplus
}
#endif

#endif // ECON_CORE_H